const session = require('koa-session');

class InitSession {
    static init(app) {
        app.keys = ['cbl session key'];
        const config = {
            key: 'cbl:koa:sess',
            maxAge: 86400000,
            overwrite: true,
            httpOnly: true,
            signed: true,
            rolling: true,
            renew: true
        };
        app.use(session(config, app));
    }
}

module.exports = InitSession;